/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 有点呆
 * Date: 2024-03-02
 * Time: 0:25
 */
import java.util.Scanner;
import java.util.Random;

public class Task {
    public static int fib( int n){
        if(n <= 2){
            return 1;
        }
        return fib(n - 1)+fib(n - 2);
    }

    public static void main(String[] args) {
        int num=10;
        for(int i = 1; i < num; i++){
            System.out.println(i+fib(i)+" ");
        }
    }



    //求最大数
    public static int max2( int x, int y) {
        if (x > y) {
            return x;
        } else {
            return y;
        }
    }
    public static int max3( int x, int y, int z){
        return max2(max2(x,y) , z);
    }
    public static void main6(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入3个数:");
        int x = scan.nextInt();
        int y = scan.nextInt();
        int z = scan.nextInt();
        System.out.println("最大值为："+max3(x, y, z));
    }


//求 123输出：3 2 1
    public static void printf(int x) {
        int n;
        if (x < 10) {
            System.out.println(x+" ");
        } else {
            System.out.print(x%10+" ");
            printf(x /= 10);
        }
    }

    public static void main5(String[] args) {
        Scanner scan = new Scanner(System.in);
        System.out.println("请输入一个数字:");
        int n = scan.nextInt();
        printf(n);
    }


    //求密码
    public static void main4(String[] args) {
        Scanner scan = new Scanner(System.in);//用户键盘输入
        Random random = new Random();//随机数生成器，用于生成新的随机数
        int randNum = random.nextInt(100);//随机生成随机数的范围[0,100)
        int n = 1;
        while(n <= 3) {
           System.out.println("请输入密码:");
           int num = scan.nextInt();//输入下一个数
                if (num == randNum) {
                   System.out.println("登陆成功！");
               } else {
                   System.out.println("密码错误！");
                   n++;
               }
           }
        System.out.println("三次密码均错误，退出程序！");
       }

       //猜数字
    public static void main3(String[] args) {
        Scanner scan = new Scanner(System.in);//用户键盘输入
        Random random = new Random();//随机数生成器，生成新的随机数
        int randNum = random.nextInt(100);//随机生成随机数的范围[0,100)
        //System.out.println("随机数为："+randNum);
        while(true){
            System.out.println("请输入你要猜数字:");
            int num = scan.nextInt();//输入下一个数字
            if(num < randNum) {
                System.out.println("猜小了！");
            }else if(num > randNum){
                System.out.println("猜大了！");
            }else{
                System.out.println("猜对了！");
                break;
            }
        }
    }


    //打印图案
    public static void main2(String[] args) {
        Scanner in = new Scanner(System.in);
        int n = in.nextInt();
            for(int i = 0; i < n; i++){
                for(int j = 0; j < n; j++){
                    if (i == j || (i + j) == n - 1) {
                        System.out.print("*");
                    } else {
                        System.out.print(" ");
                    }
                }
                //外循环完成一次，代表一行写完，此处换行进行下一次循环
                System.out.println();
            }
    }


    //求数字9出现的次数
    public static void main1(String[] args) {
        int count = 0;
        for(int i = 1; i <= 100; i++){
            if(i % 10 == 9){
                count++;
            }
            if(i / 10 == 9){
                count++;
            }
            System.out.println(count);
        }
    }
}
